<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <script type="text/javascript">
        	function whichbox(){
				//alert(document.myForm.mycheck.checked==true);
				var length=document.myForm.mycheck.length;
				for(var i=0;i<length;i++){
					if(document.myForm.mycheck[i].checked){
						alert(document.myForm.mycheck[i].value);
					}
				}
			}
        
        </script>
    </head>
    <body>
    	<form action="" name="myForm">
    		<input type="checkbox" name="mycheck" value="1"/>check1
			<input type="checkbox" name="mycheck" value="2"/>check2
			<input type="checkbox" name="mycheck" value="3" checked/>check3
			<br>
			<a href="#" onclick="whichbox();">whichbox</a>
    	</form>
    </body>
</html>
